DebugWindow is a utility that mimics the Windows 3.x program of the same name.
□□□It allows you to easily print out display strings during the development stages of
your program without any of the headaches normally associated with built-in
"standard I/O" functions.
DebugWindow's features:
・ full "printf()" functionality for C programmers without any added coding on
your part
・ will remember its location and size on the screen across sessions
・ no more hassles of trying to incorporate Think C's "stdio" window
in with your pure Toolbox code
・ allows you to save any information that you've printed into its window to a
TeachText document
・ callable from either Think C or Hypercard
How does DebugWindow work?
---------------------------
DebugWindow is made up of 2 pieces. The first is the stand-alone program that sits quietly in the background waiting for an Apple Event to come along for it. The second piece is either (a) a very small ".lib" file that you include in your Think C (5.x or 6.x)
project or (b) a code resource that you copy into your Hypercard stack with ResEdit. These pieces contain the "Debug()" function that you call whenever you want to display a string to the DebugWindow. The "DebugWindow.Lib" file is totally self-contained; all you need to do to add the functionality to your C program is:
・ Add the "DebugWindow.Lib" file to your Think C project
・ #include "Debug.h" in each of your source files that needs it.
・ if you're not already using one of the ANSI libraries in your
project, you'll need to add the ANSI-Small library.
・ make sure that the "High Level Events" flag is checked in your
"Set Project Type / Size" resource.
or to your Hypercard stack:
・ use ResCopy or ResEdit to copy the code resource "xDebug" into your
Hypercard stack.
That's it! Now you can place Debug (or xDebug) statements throughout your C or Hypercard program whenever you feel the need. For example:
void MyFunction (short xPos, short yPos)
{
Debug ( "Doing MyFunction() routine: position is %d,%d¥n", xPos, yPos );